<?php

$user_info = $User->getInfo($_SESSION['User_F_ID'],"em_user_info");
if($_SERVER['REQUEST_METHOD'] == 'POST')
{
	$data = array();
	$data['F_USER_NICKNAME'] = $_POST['nickname'];
	$data['F_USER_EMAIL'] = $_POST['email'];
	$data['F_USER_QQ'] = $_POST['qq'];
	$data['F_USER_MSN'] = $_POST['msn'];
	if($_POST['password'])
		$data['F_USER_PASSWORD'] = md5($_POST['password']);
	if($User->updateData('em_user_info', $_SESSION['User_F_ID'], $data))
		echo "个人信息设置成功!";
}

?></div>
<div id="content"><div class="admin-form">
<h3>个人设置</h3>
<form method="post" action="index.php?Action=UserSet" enctype="multipart/form-data">
<fieldset>
	<legend>名称</legend>
	<dl>
			<dt>用户名：</dt>
			<dd><?php echo $user_info['F_USER_NAME']?></dd>
	</dl>
	<dl>
			<dt>昵称：</dt>
			<dd><input type="text" name="nickname" value="<?php echo $user_info['F_USER_NICKNAME'] ?>"></dd>
	</dl>
	<dl>
			<dt>头像：</dt>
			<dd><input type="file" name="userhead" value="<?php echo $user_info['F_USER_HEAD'] ?>"></dd>
	</dl>
</fieldset>
<fieldset>
	<legend>联系信息</legend>
	<dl>
			<dt>Email：(必填)</dt>
			<dd><input type="text" name="email" value="<?php echo $user_info['F_USER_EMAIL']?>"></dd>
	</dl>
	<dl>
			<dt>QQ：</dt>
			<dd><input type="text" name="qq" value="<?php echo $user_info['F_USER_QQ']?>"></dd>
	</dl>
	<dl>
			<dt>MSN：</dt>
			<dd><input type="text" name="msn" value="<?php echo $user_info['F_USER_MSN']?>"></dd>
	</dl>
</fieldset>
<fieldset>
	<legend>更改你的密码</legend>
	<dl>
			<dt>新密码：</dt>
			<dd><input type="password" name="password"></dd>
	</dl>
<dl><dd class="submit-button"><input type="submit" value="提交个人设置"></dd></dl>
</fieldset>
</form>
</div></div>